<?php namespace system\middleware;

use houdunwang\middleware\build\Middleware;
use houdunwang\session\Session;

class Auth implements Middleware{
	//执行中间件
	public function run($next) {
         if(!Session::get('admin.admin_username')){
             //session没有指定admin_username就跳转到登录页面进行拦截
             go('admin.login.index');
         }
         $next();
	}
}